<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>polyfill</title>
  </head>
  <body>
    <!-- IE不兼容 -->
    <!-- 编译工具 编译成ES5就行了 -->
    <!-- polyfill直接支持浏览器中的大部分ESM特性 -->
    <script
      nomodule
      src="https://unpkg.com/browse/browser-es-module-loader@0.4.1/dist/babel-browser-build.js"
    ></script>
    <script
      nomodule
      src="https://unpkg.com/browse/browser-es-module-loader@0.4.1/dist/browser-es-module-loader.js"
    ></script>
    <!-- Promise未定义 -->
    <!-- 引入promise ployfill -->
    <script
      nomodule
      src="https://unpkg.com/promise-polyfill@8.1.3/dist/polyfill.min.js"
    ></script>
    <script type="module">
      import { name } from "./module.js";
      console.log(name);
    </script>
    <script></script>
  </body>
</html>
